<!-- 
  @Author: Your name
  @Date:   2020-07-17 18:36:00
  @Last Modified by:   Your name
  @Last Modified time: 2020-07-23 16:40:39
-->
<!DOCTYPE html>
<html lang="en">
{{include 'admin/public/header.html'}}

<body>
  {{include 'admin/public/nav_top.html'}}

  <div class="main-container" id="main-container">
    <script type="text/javascript">
      try {
        ace.settings.check('main-container', 'fixed')
      } catch (e) {}
    </script>

    <div class="main-container-inner">
      <a class="menu-toggler" id="menu-toggler" href="#">
        <span class="menu-text"></span>
      </a>

      {{include 'admin/public/nav_left'}}

      <div class="main-content">
        <div class="breadcrumbs" id="breadcrumbs">
          <script type="text/javascript">
            try {
              ace.settings.check('breadcrumbs', 'fixed')
            } catch (e) {}
          </script>

          <ul class="breadcrumb">
            <li>
              <i class="icon-home home-icon"></i>
              <a href="#">首页</a>
            </li>
            <li class="active">控制台</li>
          </ul><!-- .breadcrumb -->

          <div class="nav-search" id="nav-search">
            <form class="form-search">
              <span class="input-icon">
                <input type="text" placeholder="Search ..." class="nav-search-input" id="nav-search-input"
                  autocomplete="off" />
                <i class="icon-search nav-search-icon"></i>
              </span>
            </form>
          </div><!-- #nav-search -->
        </div>

        <div class="page-content">

          <div class="page-header">
            <h1>
              修改文章分类信息
            </h1>
          </div>

          <form class="form-horizontal" role="form" action="{{__HOST__}}/admin/articalcate/doEdit" method="POST">
            <input type="hidden" name="_id" value="{{@obj._id}}">
            <div class="form-group">

              <label class="col-sm-2 control-label no-padding-right" for="title">分类名称:</label>

              <div class="col-sm-6">
                <input type="text" style="width: 100%;" name="title" id="title" value="{{obj.title}}" class="col-xs-10 col-sm-5">
              </div>
              <div class="col-sm-4 title-error error-hiden" style="margin-top: 4px;color: red;"><span class="iconfont" style="margin-right: 2px; font-size: 12px;">&#xe676;  分类名称不能为空</span></div>
            </div>

            <div class="form-group">
              <label class="col-sm-2 control-label no-padding-right" for="description">描述:</label>

              <div class="col-sm-6">
                <input type="text" style="width: 100%;" name="description" id="description" class="col-xs-10 col-sm-5"
                  value="{{obj.description}}">
              </div>
              <div class="col-sm-4 description-error error-hiden" style="margin-top: 4px;color: red;"><span class="iconfont" style="margin-right: 2px; font-size: 12px;">&#xe676;  分类描述不能为空</span></div>
            </div>

            <div class="form-group">
              <label class="col-sm-2 control-label no-padding-right" for="keywords">关键字:</label>

              <div class="col-sm-6">
                <input type="text" name="keywords" style="width: 100%;" id="keywords" class="col-xs-10 col-sm-5" value="{{obj.keywords}}">
              </div>
              <div class="col-sm-4 keywords-error error-hiden" style="margin-top: 4px;color: red;"><span class="iconfont" style="margin-right: 2px; font-size: 12px;">&#xe676;  分类关键字不能为空</span></div>
            </div>
            <div class="form-group">
              <label class="col-sm-2 control-label no-padding-right" for="status">审核状态</label>
              <div class="col-sm-10" style="margin-top: 4px;">
                <label for="status1">已审核</label>&nbsp;&nbsp;&nbsp;<input type="radio" id="status1"
                  {{if obj.status=='1'}}checked{{/if}} value="1" name="status" />
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <label for="status2">未审核</label>&nbsp;&nbsp;&nbsp;<input type="radio" id="status2"
                  {{if obj.status=='0'}}checked{{/if}} value="0" name="status" />
              </div>
            </div>
            <div class="form-group">
              <div class="col-sm-offset-2 col-sm-10">
                <button type="submit" class="btn btn-success">提交修改</button>
              </div>
            </div>



          </form>

        </div>
      </div><!-- /.main-content -->

    </div><!-- /.main-container-inner -->

    <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
      <i class="icon-double-angle-up icon-only bigger-110"></i>
    </a>
  </div><!-- /.main-container -->


  <!--[if !IE]> -->

  <script type="text/javascript">
    window.jQuery || document.write("<script src='{{__HOST__}}/admin/js/jquery-2.0.3.min.js'>" + "<" + "script>");
  </script>

  <!-- <![endif]-->

  <!--[if IE]>
<script type="text/javascript">
 window.jQuery || document.write("<script src='{{__HOST__}}/admin/js/jquery-1.10.2.min.js'>"+"<"+"script>");
</script>
<![endif]-->

  <script type="text/javascript">
    if ("ontouchend" in document) document.write("<script src='{{__HOST__}}/admin/js/jquery.mobile.custom.min.js'>" +
      "<" + "script>");
  </script>
  <script src="{{__HOST__}}/admin/js/bootstrap.min.js"></script>



  <script src="{{__HOST__}}/admin/js/typeahead-bs2.min.js"></script>


  <script src="{{__HOST__}}/admin/js/bootstrap-wysiwyg.min.js"></script>

  <!-- ace scripts -->

  <script src="{{__HOST__}}/admin/js/ace-elements.min.js"></script>
  <script src="{{__HOST__}}/admin/js/ace.min.js"></script>




  <script type="text/javascript">
    $(function () {
      // 表单验证
      // 非空校验方法
      function inputIsEmpty($input, className){
        $input.blur(function(){
          let inputValue = $input.val()
          console.log(inputValue)
          if(inputValue.length == 0){
            $(className).removeClass("error-hiden")
          }else{
            $(className).addClass("error-hiden")
          }
        })
      }
      inputIsEmpty($("#title"), ".title-error")
      inputIsEmpty($("#keywords"), ".keywords-error")
      inputIsEmpty($("#description"), ".description-error")
    })
  </script>

</body>

</html>